package dbPool;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;


public class ConnectionDAO {
	
	Connection con = null;
    Statement stmt=null;
    
    public Connection createCon()
    {
 
       try
       {
           Class.forName("com.mysql.jdbc.Driver");
           con = DriverManager.getConnection("jdbc:mysql://localhost/virtualreel", "root", "root");            
       } 
       catch (SQLException ex)
       {
           Logger.getLogger(ConnectionDAO.class.getName()).log(Level.SEVERE, null, ex);
           System.out.println("Could not connect in ConnectionDAO");
       } 
       catch (ClassNotFoundException ex)
       {
           Logger.getLogger(ConnectionDAO.class.getName()).log(Level.SEVERE, null, ex);
           System.out.println("Could not connect in ConnectionDAO");
       }
       return con;
    }
    
}
